home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 67 / 067.d81 / format flash (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  3KB  |  97 lines

  1. 7 sys57812"formatter.ml",8,0:poke780,0:poke781,0:poke782,192:sys65493
  2. 10 poke53280,0:poke53281,0:open15,8,15,"i":close15:sys49152:poke53272,21
  3. 11 a=0:i=0
  4. 12 reada:ifa<>-1thenpoke828+i,a:i=i+1:goto12
  5. 14 ff$="                "
  6. 15 s$="                                      "
  7. 16 fori=0to3:readm$(i):next
  8. 21 print"[147][156]  1 5 4 1    f o r m a t    f l a s h"
  9. 22 print"          [152]by roger a. bachelder"
  10. 30 print"[163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163]"
  11. 31 print"    [150]the formatting routines in this"
  12. 32 print"    program will not[150] work on a 1571"
  13. 33 print"[163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163]"
  14. 36 poke214,10:print:fori=0to3:print""tab(9)m$(i):next
  15. 37 poke214,20:print:print"[154]   use crsr[154] keys and return[154] to select"
  16. 40 x=10:y=0:h=0:g=0:id=10
  17. 41 poke214,x+y*2:print
  18. 42 printtab(9)"[155]"m$(y)"[145]"
  19. 43 geta$:ifa$<>"[145]"anda$<>""anda$<>chr$(13)then43
  20. 44 printtab(9)""m$(y)
  21. 45 ifa$=chr$(13)thenony+1goto75,500,600,700
  22. 46 ifa$=""theny=y+1:ify>3theny=0
  23. 47 ifa$="[145]"theny=y-1:ify<0theny=3
  24. 48 goto41
  25. 75 poke214,10:print:fori=0to11:prints$:next
  26. 76 poke214,11:print:ifgthen91
  27. 80 print"      disk name[158]:[163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][145]";
  28. 84 dn$="":ln%=16:gosub300:dn$=q$
  29. 91 dl=len(dn$)
  30. 100 ifhthenid=id+1:di$=right$(str$(id),2):goto119
  31. 105 print"        disk id[158]:[163][163][157][157][145]";
  32. 112 ln%=2:gosub300:di$=q$
  33. 119 di=len(di$)
  34. 133 i1=asc(left$(di$,1)):i2=asc(right$(di$,1))
  35. 140 print"         insert disk to format"
  36. 143 poke214,20:print
  37. 145 ifhthenprint"    return[154] to continue - f1[154] to stop":goto154
  38. 147 print"[159]             press return"
  39. 154 geta$:ifa$<>chr$(13)anda$<>"[133]"then154
  40. 155 ifh anda$="[133]"thenreturn
  41. 156 poke214,11:print:fori=0to11:prints$:next
  42. 157 poke214,11:print:print"        [176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]"
  43. 158 print"        [221]                        [221]"
  44. 159 print"        [173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189][145][145][159]"
  45. 160 printtab(11)dn$;tab(29)di$
  46. 161 printtab(15)"working...":open15,8,15
  47. 175 print#15,"m-w"chr$(13*16)chr$(6)chr$(16);ff$:f$=""
  48. 182 forx=1todl:a=asc(mid$(dn$,x,1)+chr$(0)):f$=f$+chr$(a):next
  49. 189 print#15,"m-w"chr$(13*16)chr$(6)chr$(dl);f$
  50. 196 print#15,"m-w"chr$(18)chr$(0)chr$(2)chr$(i1)chr$(i2)
  51. 203 print#15,"m-e"chr$(0)chr$(5)
  52. 210 input#15,a,b$,c,d
  53. 215 ifb$="ok"thenprint"[158]           a successful format!":goto220
  54. 217 print"[158]        "a;b$;c;d
  55. 220 fort=0to2000:next:print"[145]"s$
  56. 224 close15
  57. 230 ifhtheng=1:goto75
  58. 240 goto21
  59. 300 q$="":poke198,0:u=53280
  60. 310 poke646,rnd(0)*15+1:geta$:print"[175][157]";
  61. 320 ifa$=""then310
  62. 330 ifa$=chr$(13)thenprint" ":return
  63. 340 if(a$=chr$(20)andlen(q$))thenq$=left$(q$,len(q$)-1):goto400
  64. 350 iflen(q$)>=ln%thent%=peek(u):pokeu,1:fort=0to50:next:pokeu,t%:goto310
  65. 360 ifa$=" "then390
  66. 370 ifa$>="#"anda$<="[223]"then390
  67. 380 goto310
  68. 390 q$=q$+a$
  69. 400 print""a$;:goto310
  70. 500 h=1:gosub75:goto21
  71. 600 print"[147][154]"
  72. 610 sys828
  73. 620 print"[159]         press space[159] for menu"
  74. 630 geta$:ifa$<>" "then630
  75. 635 open15,8,15,"i":close15:sys49152
  76. 640 goto21
  77. 700 poke214,20:print:print"[154]       quit?  are you sure?  (y[154]/n[154])   "
  78. 710 geta$:ifa$<>"y"anda$<>"n"then710
  79. 720 print"[147]";:ifa$="n"then21
  80. 730 open15,8,15,"r0:hello connect=hello connect":input#15,a:close15
  81. 740 ifa<>63thenend
  82. 750 print"[144]load"chr$(34)"hello connect"chr$(34)",8"
  83. 760 print"run"
  84. 770 poke631,13:poke632,13:poke198,2:end
  85. 1000 data169,36,133,251,169,251,133,187,169,0,133,188,169,1,133,183,169,8
  86. 1010 data133,186,169,96,133,185,32,213,243,165,186,32,180,255,165,185,32,150
  87. 1015 data255,169,0,133,144
  88. 1020 data160,3,132,251,32,165,255,133,252,164,144,208,47,32,165,255
  89. 1025 data164,144,208,40,164,251,136,208,233,166,252
  90. 1030 data32,205,189,169,32,32,210,255,32,165,255,166,144,208,18,170,240,6
  91. 1040 data32,210,255,184,80,240,169,13,32,210,255,160,2,208,198,32,66,246,96,-1
  92. 1200 data"  format one diskette  "
  93. 1210 data" format many diskettes "
  94. 1215 data"       directory       "
  95. 1220 data"  return to loadstar   "
  96. 10000 open15,8,15,"s0:format flash":close15:save"format flash",8:end
  97.